
test_addr = 0xfff0

function testSend()
	pkg={0x11,12,13,111,112,113,11,34,22,34}
	pkg.addr = test_addr
	pkg.port = 48
	send__(pkg)
end
function remotSleepEnable()
	pkg={string.byte("E"),0x95,0xc4}
	pkg.addr = test_addr
	pkg.port = 111
	send__(pkg)
end
function remotSleep()
	pkg={string.byte("R"),0x58,0xB2}
	pkg.addr = test_addr
	pkg.port = 111
	send__(pkg)
end

function __receive(pkg)
	if(pkg~=nil)	then
		body = ""
		for i=1,#pkg do			
			body = body..string.format("%02X ", pkg[i])
		end
		print("收到了 %d data %04X->%d: %q",#pkg,pkg.addr, pkg.port,body)
		else
		print("recv nothing")
	end
end